﻿CREATE FUNCTION [dbo].[Get15MinuteTime]
(
	@time DATETIME2
)
RETURNS BIGINT AS
BEGIN
	RETURN CAST(DATEPART(year, @time) as bigint) * 100000000 
		+ DATEPART(month, @time) * 1000000 
		+ DATEPART(day, @time)  * 10000 
		+ DATEPART(hour, @time)  * 100 
		+ DATEPART(minute, @time) 
END
